package com.catal.framework.sequence;

import org.springframework.context.ApplicationEvent;

/**
 * 序列号事件
 * 
 * <ul>
 * <li>eventType 序列号事件类型
 * <ul>
 * <li>SequenceEvent.UPDATE_NO 更新序列号</li>
 * <li>SequenceEvent.DELETE_NO 删除 序列号</li>
 * <li>SequenceEvent.UPDATE_NEXTID 更新序列号产生的实例</li>
 * </ul>
 * </li>
 * <li>noid 序列号id</li>
 * </ul>
 * @see com.catal.framework.sequence.DefaultSequence
 */
public class SequenceEvent extends ApplicationEvent {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1625603884382536479L;

	/**
	 * 事件类型：更新序列号
	 */
	public static int UPDATE_NO = 0;

	/**
	 * 事件类型：删除序列号
	 */
	public static int DELETE_NO = 1;

	/**
	 * 事件类型：更新序列号产生的实例
	 */
	public static int UPDATE_NEXTID = 2;

	/**
	 * 事件类型
	 */
	private int eventType;

	/**
	 * 序列号id
	 */
	private String noid;

	public void setNoid(String noid) {
		this.noid = noid;
	}

	public SequenceEvent(Object source, int eventType) {
		super(source);
		this.eventType = eventType;
	}

	public int getEventType() {
		return eventType;
	}

	public String getNoid() {
		return noid;
	}

	public void setEventType(int eventType) {
		this.eventType = eventType;
	}
}

